<?php


/**
 * Base class that represents a query for the 'task_goals' table.
 *
 *
 *
 * @method EmpevalTaskGoalsQuery orderById($order = Criteria::ASC) Order by the id column
 * @method EmpevalTaskGoalsQuery orderByBonusGoalsFormId($order = Criteria::ASC) Order by the bonus_goals_form_id column
 * @method EmpevalTaskGoalsQuery orderByQualityCriteriaId($order = Criteria::ASC) Order by the quality_criteria_id column
 * @method EmpevalTaskGoalsQuery orderByBonusGoalDesc($order = Criteria::ASC) Order by the bonus_goal_desc column
 * @method EmpevalTaskGoalsQuery orderByWeight($order = Criteria::ASC) Order by the weight column
 * @method EmpevalTaskGoalsQuery orderByRealization80($order = Criteria::ASC) Order by the realization_80 column
 * @method EmpevalTaskGoalsQuery orderByRealization100($order = Criteria::ASC) Order by the realization_100 column
 * @method EmpevalTaskGoalsQuery orderByMonitoring($order = Criteria::ASC) Order by the monitoring column
 * @method EmpevalTaskGoalsQuery orderBySelfAppraisalId($order = Criteria::ASC) Order by the self_appraisal_id column
 * @method EmpevalTaskGoalsQuery orderByResultAchieved($order = Criteria::ASC) Order by the result_achieved column
 * @method EmpevalTaskGoalsQuery orderByResult($order = Criteria::ASC) Order by the result column
 * @method EmpevalTaskGoalsQuery orderByWeightResult($order = Criteria::ASC) Order by the weight_result column
 * @method EmpevalTaskGoalsQuery orderByComment($order = Criteria::ASC) Order by the comment column
 * @method EmpevalTaskGoalsQuery orderByStatus($order = Criteria::ASC) Order by the status column
 * @method EmpevalTaskGoalsQuery orderByLastModified($order = Criteria::ASC) Order by the last_modified column
 * @method EmpevalTaskGoalsQuery orderByCreated($order = Criteria::ASC) Order by the created column
 *
 * @method EmpevalTaskGoalsQuery groupById() Group by the id column
 * @method EmpevalTaskGoalsQuery groupByBonusGoalsFormId() Group by the bonus_goals_form_id column
 * @method EmpevalTaskGoalsQuery groupByQualityCriteriaId() Group by the quality_criteria_id column
 * @method EmpevalTaskGoalsQuery groupByBonusGoalDesc() Group by the bonus_goal_desc column
 * @method EmpevalTaskGoalsQuery groupByWeight() Group by the weight column
 * @method EmpevalTaskGoalsQuery groupByRealization80() Group by the realization_80 column
 * @method EmpevalTaskGoalsQuery groupByRealization100() Group by the realization_100 column
 * @method EmpevalTaskGoalsQuery groupByMonitoring() Group by the monitoring column
 * @method EmpevalTaskGoalsQuery groupBySelfAppraisalId() Group by the self_appraisal_id column
 * @method EmpevalTaskGoalsQuery groupByResultAchieved() Group by the result_achieved column
 * @method EmpevalTaskGoalsQuery groupByResult() Group by the result column
 * @method EmpevalTaskGoalsQuery groupByWeightResult() Group by the weight_result column
 * @method EmpevalTaskGoalsQuery groupByComment() Group by the comment column
 * @method EmpevalTaskGoalsQuery groupByStatus() Group by the status column
 * @method EmpevalTaskGoalsQuery groupByLastModified() Group by the last_modified column
 * @method EmpevalTaskGoalsQuery groupByCreated() Group by the created column
 *
 * @method EmpevalTaskGoalsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 * @method EmpevalTaskGoalsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 * @method EmpevalTaskGoalsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 *
 * @method EmpevalTaskGoalsQuery leftJoinBonusGoalsForms($relationAlias = null) Adds a LEFT JOIN clause to the query using the BonusGoalsForms relation
 * @method EmpevalTaskGoalsQuery rightJoinBonusGoalsForms($relationAlias = null) Adds a RIGHT JOIN clause to the query using the BonusGoalsForms relation
 * @method EmpevalTaskGoalsQuery innerJoinBonusGoalsForms($relationAlias = null) Adds a INNER JOIN clause to the query using the BonusGoalsForms relation
 *
 * @method EmpevalTaskGoalsQuery leftJoinViewBgfWithSuperiorPositionId($relationAlias = null) Adds a LEFT JOIN clause to the query using the ViewBgfWithSuperiorPositionId relation
 * @method EmpevalTaskGoalsQuery rightJoinViewBgfWithSuperiorPositionId($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ViewBgfWithSuperiorPositionId relation
 * @method EmpevalTaskGoalsQuery innerJoinViewBgfWithSuperiorPositionId($relationAlias = null) Adds a INNER JOIN clause to the query using the ViewBgfWithSuperiorPositionId relation
 *
 * @method EmpevalTaskGoalsQuery leftJoinViewBonusReport($relationAlias = null) Adds a LEFT JOIN clause to the query using the ViewBonusReport relation
 * @method EmpevalTaskGoalsQuery rightJoinViewBonusReport($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ViewBonusReport relation
 * @method EmpevalTaskGoalsQuery innerJoinViewBonusReport($relationAlias = null) Adds a INNER JOIN clause to the query using the ViewBonusReport relation
 *
 * @method EmpevalTaskGoalsQuery leftJoinQualityCriteria($relationAlias = null) Adds a LEFT JOIN clause to the query using the QualityCriteria relation
 * @method EmpevalTaskGoalsQuery rightJoinQualityCriteria($relationAlias = null) Adds a RIGHT JOIN clause to the query using the QualityCriteria relation
 * @method EmpevalTaskGoalsQuery innerJoinQualityCriteria($relationAlias = null) Adds a INNER JOIN clause to the query using the QualityCriteria relation
 *
 * @method EmpevalTaskGoalsQuery leftJoinSelfAppraisals($relationAlias = null) Adds a LEFT JOIN clause to the query using the SelfAppraisals relation
 * @method EmpevalTaskGoalsQuery rightJoinSelfAppraisals($relationAlias = null) Adds a RIGHT JOIN clause to the query using the SelfAppraisals relation
 * @method EmpevalTaskGoalsQuery innerJoinSelfAppraisals($relationAlias = null) Adds a INNER JOIN clause to the query using the SelfAppraisals relation
 *
 * @method EmpevalTaskGoals findOne(PropelPDO $con = null) Return the first EmpevalTaskGoals matching the query
 * @method EmpevalTaskGoals findOneOrCreate(PropelPDO $con = null) Return the first EmpevalTaskGoals matching the query, or a new EmpevalTaskGoals object populated from the query conditions when no match is found
 *
 * @method EmpevalTaskGoals findOneById(int $id) Return the first EmpevalTaskGoals filtered by the id column
 * @method EmpevalTaskGoals findOneByBonusGoalsFormId(int $bonus_goals_form_id) Return the first EmpevalTaskGoals filtered by the bonus_goals_form_id column
 * @method EmpevalTaskGoals findOneByQualityCriteriaId(int $quality_criteria_id) Return the first EmpevalTaskGoals filtered by the quality_criteria_id column
 * @method EmpevalTaskGoals findOneByBonusGoalDesc(string $bonus_goal_desc) Return the first EmpevalTaskGoals filtered by the bonus_goal_desc column
 * @method EmpevalTaskGoals findOneByWeight(int $weight) Return the first EmpevalTaskGoals filtered by the weight column
 * @method EmpevalTaskGoals findOneByRealization80(string $realization_80) Return the first EmpevalTaskGoals filtered by the realization_80 column
 * @method EmpevalTaskGoals findOneByRealization100(string $realization_100) Return the first EmpevalTaskGoals filtered by the realization_100 column
 * @method EmpevalTaskGoals findOneByMonitoring(string $monitoring) Return the first EmpevalTaskGoals filtered by the monitoring column
 * @method EmpevalTaskGoals findOneBySelfAppraisalId(int $self_appraisal_id) Return the first EmpevalTaskGoals filtered by the self_appraisal_id column
 * @method EmpevalTaskGoals findOneByResultAchieved(string $result_achieved) Return the first EmpevalTaskGoals filtered by the result_achieved column
 * @method EmpevalTaskGoals findOneByResult(string $result) Return the first EmpevalTaskGoals filtered by the result column
 * @method EmpevalTaskGoals findOneByWeightResult(string $weight_result) Return the first EmpevalTaskGoals filtered by the weight_result column
 * @method EmpevalTaskGoals findOneByComment(string $comment) Return the first EmpevalTaskGoals filtered by the comment column
 * @method EmpevalTaskGoals findOneByStatus(int $status) Return the first EmpevalTaskGoals filtered by the status column
 * @method EmpevalTaskGoals findOneByLastModified(string $last_modified) Return the first EmpevalTaskGoals filtered by the last_modified column
 * @method EmpevalTaskGoals findOneByCreated(string $created) Return the first EmpevalTaskGoals filtered by the created column
 *
 * @method array findById(int $id) Return EmpevalTaskGoals objects filtered by the id column
 * @method array findByBonusGoalsFormId(int $bonus_goals_form_id) Return EmpevalTaskGoals objects filtered by the bonus_goals_form_id column
 * @method array findByQualityCriteriaId(int $quality_criteria_id) Return EmpevalTaskGoals objects filtered by the quality_criteria_id column
 * @method array findByBonusGoalDesc(string $bonus_goal_desc) Return EmpevalTaskGoals objects filtered by the bonus_goal_desc column
 * @method array findByWeight(int $weight) Return EmpevalTaskGoals objects filtered by the weight column
 * @method array findByRealization80(string $realization_80) Return EmpevalTaskGoals objects filtered by the realization_80 column
 * @method array findByRealization100(string $realization_100) Return EmpevalTaskGoals objects filtered by the realization_100 column
 * @method array findByMonitoring(string $monitoring) Return EmpevalTaskGoals objects filtered by the monitoring column
 * @method array findBySelfAppraisalId(int $self_appraisal_id) Return EmpevalTaskGoals objects filtered by the self_appraisal_id column
 * @method array findByResultAchieved(string $result_achieved) Return EmpevalTaskGoals objects filtered by the result_achieved column
 * @method array findByResult(string $result) Return EmpevalTaskGoals objects filtered by the result column
 * @method array findByWeightResult(string $weight_result) Return EmpevalTaskGoals objects filtered by the weight_result column
 * @method array findByComment(string $comment) Return EmpevalTaskGoals objects filtered by the comment column
 * @method array findByStatus(int $status) Return EmpevalTaskGoals objects filtered by the status column
 * @method array findByLastModified(string $last_modified) Return EmpevalTaskGoals objects filtered by the last_modified column
 * @method array findByCreated(string $created) Return EmpevalTaskGoals objects filtered by the created column
 *
 * @package    propel.generator.empeval.om
 */
abstract class EmpevalBaseTaskGoalsQuery extends ModelCriteria
{
    /**
     * Initializes internal state of EmpevalBaseTaskGoalsQuery object.
     *
     * @param     string $dbName The dabase name
     * @param     string $modelName The phpName of a model, e.g. 'Book'
     * @param     string $modelAlias The alias for the model in this query, e.g. 'b'
     */
    public function __construct($dbName = 'vgp_empeval', $modelName = 'EmpevalTaskGoals', $modelAlias = null)
    {
        parent::__construct($dbName, $modelName, $modelAlias);
    }

    /**
     * Returns a new EmpevalTaskGoalsQuery object.
     *
     * @param     string $modelAlias The alias of a model in the query
     * @param     EmpevalTaskGoalsQuery|Criteria $criteria Optional Criteria to build the query from
     *
     * @return EmpevalTaskGoalsQuery
     */
    public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof EmpevalTaskGoalsQuery) {
            return $criteria;
        }
        $query = new EmpevalTaskGoalsQuery();
        if (null !== $modelAlias) {
            $query->setModelAlias($modelAlias);
        }
        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }

    /**
     * Find object by primary key.
     * Propel uses the instance pool to skip the database if the object exists.
     * Go fast if the query is untouched.
     *
     * <code>
     * $obj  = $c->findPk(12, $con);
     * </code>
     *
     * @param mixed $key Primary key to use for the query
     * @param     PropelPDO $con an optional connection object
     *
     * @return   EmpevalTaskGoals|EmpevalTaskGoals[]|mixed the result, formatted by the current formatter
     */
    public function findPk($key, $con = null)
    {
        if ($key === null) {
            return null;
        }
        if ((null !== ($obj = EmpevalTaskGoalsPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
            // the object is alredy in the instance pool
            return $obj;
        }
        if ($con === null) {
            $con = Propel::getConnection(EmpevalTaskGoalsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        if ($this->formatter || $this->modelAlias || $this->with || $this->select
         || $this->selectColumns || $this->asColumns || $this->selectModifiers
         || $this->map || $this->having || $this->joins) {
            return $this->findPkComplex($key, $con);
        } else {
            return $this->findPkSimple($key, $con);
        }
    }

    /**
     * Find object by primary key using raw SQL to go fast.
     * Bypass doSelect() and the object formatter by using generated code.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return   EmpevalTaskGoals A model object, or null if the key is not found
     * @throws   PropelException
     */
    protected function findPkSimple($key, $con)
    {
        $sql = 'SELECT ID, BONUS_GOALS_FORM_ID, QUALITY_CRITERIA_ID, BONUS_GOAL_DESC, WEIGHT, REALIZATION_80, REALIZATION_100, MONITORING, SELF_APPRAISAL_ID, RESULT_ACHIEVED, RESULT, WEIGHT_RESULT, COMMENT, STATUS, LAST_MODIFIED, CREATED FROM task_goals WHERE ID = :p0';
        try {
            $stmt = $con->prepare($sql);
            $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
        }
        $obj = null;
        if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
            $obj = new EmpevalTaskGoals();
            $obj->hydrate($row);
            EmpevalTaskGoalsPeer::addInstanceToPool($obj, (string) $key);
        }
        $stmt->closeCursor();

        return $obj;
    }

    /**
     * Find object by primary key.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return EmpevalTaskGoals|EmpevalTaskGoals[]|mixed the result, formatted by the current formatter
     */
    protected function findPkComplex($key, $con)
    {
        // As the query uses a PK condition, no limit(1) is necessary.
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKey($key)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
    }

    /**
     * Find objects by primary key
     * <code>
     * $objs = $c->findPks(array(12, 56, 832), $con);
     * </code>
     * @param     array $keys Primary keys to use for the query
     * @param     PropelPDO $con an optional connection object
     *
     * @return PropelObjectCollection|EmpevalTaskGoals[]|mixed the list of results, formatted by the current formatter
     */
    public function findPks($keys, $con = null)
    {
        if ($con === null) {
            $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKeys($keys)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->format($stmt);
    }

    /**
     * Filter the query by primary key
     *
     * @param     mixed $key Primary key to use for the query
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByPrimaryKey($key)
    {

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::ID, $key, Criteria::EQUAL);
    }

    /**
     * Filter the query by a list of primary keys
     *
     * @param     array $keys The list of primary key to use for the query
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByPrimaryKeys($keys)
    {

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::ID, $keys, Criteria::IN);
    }

    /**
     * Filter the query on the id column
     *
     * Example usage:
     * <code>
     * $query->filterById(1234); // WHERE id = 1234
     * $query->filterById(array(12, 34)); // WHERE id IN (12, 34)
     * $query->filterById(array('min' => 12)); // WHERE id > 12
     * </code>
     *
     * @param     mixed $id The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterById($id = null, $comparison = null)
    {
        if (is_array($id) && null === $comparison) {
            $comparison = Criteria::IN;
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::ID, $id, $comparison);
    }

    /**
     * Filter the query on the bonus_goals_form_id column
     *
     * Example usage:
     * <code>
     * $query->filterByBonusGoalsFormId(1234); // WHERE bonus_goals_form_id = 1234
     * $query->filterByBonusGoalsFormId(array(12, 34)); // WHERE bonus_goals_form_id IN (12, 34)
     * $query->filterByBonusGoalsFormId(array('min' => 12)); // WHERE bonus_goals_form_id > 12
     * </code>
     *
     * @see       filterByBonusGoalsForms()
     *
     * @see       filterByViewBgfWithSuperiorPositionId()
     *
     * @see       filterByViewBonusReport()
     *
     * @param     mixed $bonusGoalsFormId The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByBonusGoalsFormId($bonusGoalsFormId = null, $comparison = null)
    {
        if (is_array($bonusGoalsFormId)) {
            $useMinMax = false;
            if (isset($bonusGoalsFormId['min'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOALS_FORM_ID, $bonusGoalsFormId['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($bonusGoalsFormId['max'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOALS_FORM_ID, $bonusGoalsFormId['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOALS_FORM_ID, $bonusGoalsFormId, $comparison);
    }

    /**
     * Filter the query on the quality_criteria_id column
     *
     * Example usage:
     * <code>
     * $query->filterByQualityCriteriaId(1234); // WHERE quality_criteria_id = 1234
     * $query->filterByQualityCriteriaId(array(12, 34)); // WHERE quality_criteria_id IN (12, 34)
     * $query->filterByQualityCriteriaId(array('min' => 12)); // WHERE quality_criteria_id > 12
     * </code>
     *
     * @see       filterByQualityCriteria()
     *
     * @param     mixed $qualityCriteriaId The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByQualityCriteriaId($qualityCriteriaId = null, $comparison = null)
    {
        if (is_array($qualityCriteriaId)) {
            $useMinMax = false;
            if (isset($qualityCriteriaId['min'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::QUALITY_CRITERIA_ID, $qualityCriteriaId['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($qualityCriteriaId['max'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::QUALITY_CRITERIA_ID, $qualityCriteriaId['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::QUALITY_CRITERIA_ID, $qualityCriteriaId, $comparison);
    }

    /**
     * Filter the query on the bonus_goal_desc column
     *
     * Example usage:
     * <code>
     * $query->filterByBonusGoalDesc('fooValue');   // WHERE bonus_goal_desc = 'fooValue'
     * $query->filterByBonusGoalDesc('%fooValue%'); // WHERE bonus_goal_desc LIKE '%fooValue%'
     * </code>
     *
     * @param     string $bonusGoalDesc The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByBonusGoalDesc($bonusGoalDesc = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($bonusGoalDesc)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $bonusGoalDesc)) {
                $bonusGoalDesc = str_replace('*', '%', $bonusGoalDesc);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOAL_DESC, $bonusGoalDesc, $comparison);
    }

    /**
     * Filter the query on the weight column
     *
     * Example usage:
     * <code>
     * $query->filterByWeight(1234); // WHERE weight = 1234
     * $query->filterByWeight(array(12, 34)); // WHERE weight IN (12, 34)
     * $query->filterByWeight(array('min' => 12)); // WHERE weight > 12
     * </code>
     *
     * @param     mixed $weight The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByWeight($weight = null, $comparison = null)
    {
        if (is_array($weight)) {
            $useMinMax = false;
            if (isset($weight['min'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::WEIGHT, $weight['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($weight['max'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::WEIGHT, $weight['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::WEIGHT, $weight, $comparison);
    }

    /**
     * Filter the query on the realization_80 column
     *
     * Example usage:
     * <code>
     * $query->filterByRealization80('fooValue');   // WHERE realization_80 = 'fooValue'
     * $query->filterByRealization80('%fooValue%'); // WHERE realization_80 LIKE '%fooValue%'
     * </code>
     *
     * @param     string $realization80 The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByRealization80($realization80 = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($realization80)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $realization80)) {
                $realization80 = str_replace('*', '%', $realization80);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::REALIZATION_80, $realization80, $comparison);
    }

    /**
     * Filter the query on the realization_100 column
     *
     * Example usage:
     * <code>
     * $query->filterByRealization100('fooValue');   // WHERE realization_100 = 'fooValue'
     * $query->filterByRealization100('%fooValue%'); // WHERE realization_100 LIKE '%fooValue%'
     * </code>
     *
     * @param     string $realization100 The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByRealization100($realization100 = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($realization100)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $realization100)) {
                $realization100 = str_replace('*', '%', $realization100);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::REALIZATION_100, $realization100, $comparison);
    }

    /**
     * Filter the query on the monitoring column
     *
     * Example usage:
     * <code>
     * $query->filterByMonitoring('fooValue');   // WHERE monitoring = 'fooValue'
     * $query->filterByMonitoring('%fooValue%'); // WHERE monitoring LIKE '%fooValue%'
     * </code>
     *
     * @param     string $monitoring The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByMonitoring($monitoring = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($monitoring)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $monitoring)) {
                $monitoring = str_replace('*', '%', $monitoring);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::MONITORING, $monitoring, $comparison);
    }

    /**
     * Filter the query on the self_appraisal_id column
     *
     * Example usage:
     * <code>
     * $query->filterBySelfAppraisalId(1234); // WHERE self_appraisal_id = 1234
     * $query->filterBySelfAppraisalId(array(12, 34)); // WHERE self_appraisal_id IN (12, 34)
     * $query->filterBySelfAppraisalId(array('min' => 12)); // WHERE self_appraisal_id > 12
     * </code>
     *
     * @see       filterBySelfAppraisals()
     *
     * @param     mixed $selfAppraisalId The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterBySelfAppraisalId($selfAppraisalId = null, $comparison = null)
    {
        if (is_array($selfAppraisalId)) {
            $useMinMax = false;
            if (isset($selfAppraisalId['min'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::SELF_APPRAISAL_ID, $selfAppraisalId['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($selfAppraisalId['max'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::SELF_APPRAISAL_ID, $selfAppraisalId['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::SELF_APPRAISAL_ID, $selfAppraisalId, $comparison);
    }

    /**
     * Filter the query on the result_achieved column
     *
     * Example usage:
     * <code>
     * $query->filterByResultAchieved('fooValue');   // WHERE result_achieved = 'fooValue'
     * $query->filterByResultAchieved('%fooValue%'); // WHERE result_achieved LIKE '%fooValue%'
     * </code>
     *
     * @param     string $resultAchieved The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByResultAchieved($resultAchieved = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($resultAchieved)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $resultAchieved)) {
                $resultAchieved = str_replace('*', '%', $resultAchieved);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::RESULT_ACHIEVED, $resultAchieved, $comparison);
    }

    /**
     * Filter the query on the result column
     *
     * Example usage:
     * <code>
     * $query->filterByResult(1234); // WHERE result = 1234
     * $query->filterByResult(array(12, 34)); // WHERE result IN (12, 34)
     * $query->filterByResult(array('min' => 12)); // WHERE result > 12
     * </code>
     *
     * @param     mixed $result The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByResult($result = null, $comparison = null)
    {
        if (is_array($result)) {
            $useMinMax = false;
            if (isset($result['min'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::RESULT, $result['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($result['max'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::RESULT, $result['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::RESULT, $result, $comparison);
    }

    /**
     * Filter the query on the weight_result column
     *
     * Example usage:
     * <code>
     * $query->filterByWeightResult(1234); // WHERE weight_result = 1234
     * $query->filterByWeightResult(array(12, 34)); // WHERE weight_result IN (12, 34)
     * $query->filterByWeightResult(array('min' => 12)); // WHERE weight_result > 12
     * </code>
     *
     * @param     mixed $weightResult The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByWeightResult($weightResult = null, $comparison = null)
    {
        if (is_array($weightResult)) {
            $useMinMax = false;
            if (isset($weightResult['min'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::WEIGHT_RESULT, $weightResult['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($weightResult['max'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::WEIGHT_RESULT, $weightResult['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::WEIGHT_RESULT, $weightResult, $comparison);
    }

    /**
     * Filter the query on the comment column
     *
     * Example usage:
     * <code>
     * $query->filterByComment('fooValue');   // WHERE comment = 'fooValue'
     * $query->filterByComment('%fooValue%'); // WHERE comment LIKE '%fooValue%'
     * </code>
     *
     * @param     string $comment The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByComment($comment = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($comment)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $comment)) {
                $comment = str_replace('*', '%', $comment);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::COMMENT, $comment, $comparison);
    }

    /**
     * Filter the query on the status column
     *
     * Example usage:
     * <code>
     * $query->filterByStatus(1234); // WHERE status = 1234
     * $query->filterByStatus(array(12, 34)); // WHERE status IN (12, 34)
     * $query->filterByStatus(array('min' => 12)); // WHERE status > 12
     * </code>
     *
     * @param     mixed $status The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByStatus($status = null, $comparison = null)
    {
        if (is_array($status)) {
            $useMinMax = false;
            if (isset($status['min'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::STATUS, $status['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($status['max'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::STATUS, $status['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::STATUS, $status, $comparison);
    }

    /**
     * Filter the query on the last_modified column
     *
     * Example usage:
     * <code>
     * $query->filterByLastModified('2011-03-14'); // WHERE last_modified = '2011-03-14'
     * $query->filterByLastModified('now'); // WHERE last_modified = '2011-03-14'
     * $query->filterByLastModified(array('max' => 'yesterday')); // WHERE last_modified > '2011-03-13'
     * </code>
     *
     * @param     mixed $lastModified The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByLastModified($lastModified = null, $comparison = null)
    {
        if (is_array($lastModified)) {
            $useMinMax = false;
            if (isset($lastModified['min'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::LAST_MODIFIED, $lastModified['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($lastModified['max'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::LAST_MODIFIED, $lastModified['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::LAST_MODIFIED, $lastModified, $comparison);
    }

    /**
     * Filter the query on the created column
     *
     * Example usage:
     * <code>
     * $query->filterByCreated('2011-03-14'); // WHERE created = '2011-03-14'
     * $query->filterByCreated('now'); // WHERE created = '2011-03-14'
     * $query->filterByCreated(array('max' => 'yesterday')); // WHERE created > '2011-03-13'
     * </code>
     *
     * @param     mixed $created The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function filterByCreated($created = null, $comparison = null)
    {
        if (is_array($created)) {
            $useMinMax = false;
            if (isset($created['min'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::CREATED, $created['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($created['max'])) {
                $this->addUsingAlias(EmpevalTaskGoalsPeer::CREATED, $created['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalTaskGoalsPeer::CREATED, $created, $comparison);
    }

    /**
     * Filter the query by a related EmpevalBonusGoalsForms object
     *
     * @param   EmpevalBonusGoalsForms|PropelObjectCollection $bonusGoalsForms The related object(s) to use as filter
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return   EmpevalTaskGoalsQuery The current query, for fluid interface
     * @throws   PropelException - if the provided filter is invalid.
     */
    public function filterByBonusGoalsForms($bonusGoalsForms, $comparison = null)
    {
        if ($bonusGoalsForms instanceof EmpevalBonusGoalsForms) {
            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOALS_FORM_ID, $bonusGoalsForms->getId(), $comparison);
        } elseif ($bonusGoalsForms instanceof PropelObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOALS_FORM_ID, $bonusGoalsForms->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByBonusGoalsForms() only accepts arguments of type EmpevalBonusGoalsForms or PropelCollection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the BonusGoalsForms relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function joinBonusGoalsForms($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('BonusGoalsForms');

        // create a ModelJoin object for this join
        $join = new ModelJoin();
        $join->setJoinType($joinType);
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
        if ($previousJoin = $this->getPreviousJoin()) {
            $join->setPreviousJoin($previousJoin);
        }

        // add the ModelJoin to the current object
        if ($relationAlias) {
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
            $this->addJoinObject($join, $relationAlias);
        } else {
            $this->addJoinObject($join, 'BonusGoalsForms');
        }

        return $this;
    }

    /**
     * Use the BonusGoalsForms relation BonusGoalsForms object
     *
     * @see       useQuery()
     *
     * @param     string $relationAlias optional alias for the relation,
     *                                   to be used as main alias in the secondary query
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return   EmpevalBonusGoalsFormsQuery A secondary query class using the current class as primary query
     */
    public function useBonusGoalsFormsQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinBonusGoalsForms($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'BonusGoalsForms', 'EmpevalBonusGoalsFormsQuery');
    }

    /**
     * Filter the query by a related EmpevalViewBgfWithSuperiorPositionId object
     *
     * @param   EmpevalViewBgfWithSuperiorPositionId|PropelObjectCollection $viewBgfWithSuperiorPositionId The related object(s) to use as filter
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return   EmpevalTaskGoalsQuery The current query, for fluid interface
     * @throws   PropelException - if the provided filter is invalid.
     */
    public function filterByViewBgfWithSuperiorPositionId($viewBgfWithSuperiorPositionId, $comparison = null)
    {
        if ($viewBgfWithSuperiorPositionId instanceof EmpevalViewBgfWithSuperiorPositionId) {
            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOALS_FORM_ID, $viewBgfWithSuperiorPositionId->getId(), $comparison);
        } elseif ($viewBgfWithSuperiorPositionId instanceof PropelObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOALS_FORM_ID, $viewBgfWithSuperiorPositionId->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByViewBgfWithSuperiorPositionId() only accepts arguments of type EmpevalViewBgfWithSuperiorPositionId or PropelCollection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the ViewBgfWithSuperiorPositionId relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function joinViewBgfWithSuperiorPositionId($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('ViewBgfWithSuperiorPositionId');

        // create a ModelJoin object for this join
        $join = new ModelJoin();
        $join->setJoinType($joinType);
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
        if ($previousJoin = $this->getPreviousJoin()) {
            $join->setPreviousJoin($previousJoin);
        }

        // add the ModelJoin to the current object
        if ($relationAlias) {
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
            $this->addJoinObject($join, $relationAlias);
        } else {
            $this->addJoinObject($join, 'ViewBgfWithSuperiorPositionId');
        }

        return $this;
    }

    /**
     * Use the ViewBgfWithSuperiorPositionId relation ViewBgfWithSuperiorPositionId object
     *
     * @see       useQuery()
     *
     * @param     string $relationAlias optional alias for the relation,
     *                                   to be used as main alias in the secondary query
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return   EmpevalViewBgfWithSuperiorPositionIdQuery A secondary query class using the current class as primary query
     */
    public function useViewBgfWithSuperiorPositionIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinViewBgfWithSuperiorPositionId($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'ViewBgfWithSuperiorPositionId', 'EmpevalViewBgfWithSuperiorPositionIdQuery');
    }

    /**
     * Filter the query by a related EmpevalViewBonusReport object
     *
     * @param   EmpevalViewBonusReport|PropelObjectCollection $viewBonusReport The related object(s) to use as filter
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return   EmpevalTaskGoalsQuery The current query, for fluid interface
     * @throws   PropelException - if the provided filter is invalid.
     */
    public function filterByViewBonusReport($viewBonusReport, $comparison = null)
    {
        if ($viewBonusReport instanceof EmpevalViewBonusReport) {
            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOALS_FORM_ID, $viewBonusReport->getBonusGoalsFormId(), $comparison);
        } elseif ($viewBonusReport instanceof PropelObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::BONUS_GOALS_FORM_ID, $viewBonusReport->toKeyValue('PrimaryKey', 'BonusGoalsFormId'), $comparison);
        } else {
            throw new PropelException('filterByViewBonusReport() only accepts arguments of type EmpevalViewBonusReport or PropelCollection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the ViewBonusReport relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function joinViewBonusReport($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('ViewBonusReport');

        // create a ModelJoin object for this join
        $join = new ModelJoin();
        $join->setJoinType($joinType);
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
        if ($previousJoin = $this->getPreviousJoin()) {
            $join->setPreviousJoin($previousJoin);
        }

        // add the ModelJoin to the current object
        if ($relationAlias) {
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
            $this->addJoinObject($join, $relationAlias);
        } else {
            $this->addJoinObject($join, 'ViewBonusReport');
        }

        return $this;
    }

    /**
     * Use the ViewBonusReport relation ViewBonusReport object
     *
     * @see       useQuery()
     *
     * @param     string $relationAlias optional alias for the relation,
     *                                   to be used as main alias in the secondary query
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return   EmpevalViewBonusReportQuery A secondary query class using the current class as primary query
     */
    public function useViewBonusReportQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinViewBonusReport($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'ViewBonusReport', 'EmpevalViewBonusReportQuery');
    }

    /**
     * Filter the query by a related EmpevalQualityCriteria object
     *
     * @param   EmpevalQualityCriteria|PropelObjectCollection $qualityCriteria The related object(s) to use as filter
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return   EmpevalTaskGoalsQuery The current query, for fluid interface
     * @throws   PropelException - if the provided filter is invalid.
     */
    public function filterByQualityCriteria($qualityCriteria, $comparison = null)
    {
        if ($qualityCriteria instanceof EmpevalQualityCriteria) {
            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::QUALITY_CRITERIA_ID, $qualityCriteria->getId(), $comparison);
        } elseif ($qualityCriteria instanceof PropelObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::QUALITY_CRITERIA_ID, $qualityCriteria->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByQualityCriteria() only accepts arguments of type EmpevalQualityCriteria or PropelCollection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the QualityCriteria relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function joinQualityCriteria($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('QualityCriteria');

        // create a ModelJoin object for this join
        $join = new ModelJoin();
        $join->setJoinType($joinType);
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
        if ($previousJoin = $this->getPreviousJoin()) {
            $join->setPreviousJoin($previousJoin);
        }

        // add the ModelJoin to the current object
        if ($relationAlias) {
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
            $this->addJoinObject($join, $relationAlias);
        } else {
            $this->addJoinObject($join, 'QualityCriteria');
        }

        return $this;
    }

    /**
     * Use the QualityCriteria relation QualityCriteria object
     *
     * @see       useQuery()
     *
     * @param     string $relationAlias optional alias for the relation,
     *                                   to be used as main alias in the secondary query
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return   EmpevalQualityCriteriaQuery A secondary query class using the current class as primary query
     */
    public function useQualityCriteriaQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
    {
        return $this
            ->joinQualityCriteria($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'QualityCriteria', 'EmpevalQualityCriteriaQuery');
    }

    /**
     * Filter the query by a related EmpevalSelfAppraisals object
     *
     * @param   EmpevalSelfAppraisals|PropelObjectCollection $selfAppraisals The related object(s) to use as filter
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return   EmpevalTaskGoalsQuery The current query, for fluid interface
     * @throws   PropelException - if the provided filter is invalid.
     */
    public function filterBySelfAppraisals($selfAppraisals, $comparison = null)
    {
        if ($selfAppraisals instanceof EmpevalSelfAppraisals) {
            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::SELF_APPRAISAL_ID, $selfAppraisals->getId(), $comparison);
        } elseif ($selfAppraisals instanceof PropelObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(EmpevalTaskGoalsPeer::SELF_APPRAISAL_ID, $selfAppraisals->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterBySelfAppraisals() only accepts arguments of type EmpevalSelfAppraisals or PropelCollection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the SelfAppraisals relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function joinSelfAppraisals($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('SelfAppraisals');

        // create a ModelJoin object for this join
        $join = new ModelJoin();
        $join->setJoinType($joinType);
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
        if ($previousJoin = $this->getPreviousJoin()) {
            $join->setPreviousJoin($previousJoin);
        }

        // add the ModelJoin to the current object
        if ($relationAlias) {
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
            $this->addJoinObject($join, $relationAlias);
        } else {
            $this->addJoinObject($join, 'SelfAppraisals');
        }

        return $this;
    }

    /**
     * Use the SelfAppraisals relation SelfAppraisals object
     *
     * @see       useQuery()
     *
     * @param     string $relationAlias optional alias for the relation,
     *                                   to be used as main alias in the secondary query
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return   EmpevalSelfAppraisalsQuery A secondary query class using the current class as primary query
     */
    public function useSelfAppraisalsQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
    {
        return $this
            ->joinSelfAppraisals($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'SelfAppraisals', 'EmpevalSelfAppraisalsQuery');
    }

    /**
     * Exclude object from result
     *
     * @param   EmpevalTaskGoals $taskGoals Object to remove from the list of results
     *
     * @return EmpevalTaskGoalsQuery The current query, for fluid interface
     */
    public function prune($taskGoals = null)
    {
        if ($taskGoals) {
            $this->addUsingAlias(EmpevalTaskGoalsPeer::ID, $taskGoals->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }

}
